package cn.cdeden.knowledge.domain;


import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.*;
//import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* @author GW
* @date 2022-11-30
*/
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("enterprise_template_tree")
public class EnterpriseTemplateTree implements Serializable {
    private static final long serialVersionUID = 1L;


//    @ApiModelProperty(value = "编号")
    @TableId(type= IdType.AUTO)
    private Long id;

//    @ApiModelProperty(value = "父亲编号")
    private String parentId;

//    @ApiModelProperty(value = "父亲编号2")
    private String parentId2;

//    @ApiModelProperty(value = "父亲编号3")
    private String parentId3;

//    @ApiModelProperty(value = "描述")
    private String description;

//    @ApiModelProperty(value = "喜欢数")
    private Integer likes;

//    @ApiModelProperty(value = "icon")
    private String icon;

//    @ApiModelProperty(value = "后缀名")
    private String suffix;

//    @ApiModelProperty(value = "名称")
    private String realName;

//    @ApiModelProperty(value = "上级路径")
    private String superiorsPath;

//    @ApiModelProperty(value = "路径")
    private String path;

//    @ApiModelProperty(value = "下一级类型")
    private String type;

//    @ApiModelProperty(value = "储存表id")
    private String storageId;

//    @ApiModelProperty(value = "储存服务器类型")
    private String storageType;

//    @ApiModelProperty(value = "文件大小")
    private Long size;

//    @ApiModelProperty(value = "状态（0：未审批 1：已审批）")
    private String state;

    private String attention;

//    @ApiModelProperty("收藏数")
    private String collection;

//    @ApiModelProperty("收藏数")
    private Integer download;

    private String columnType;

//    @ApiModelProperty(value = "创建编号")
    private String createId;

//    @ApiModelProperty(value = "创建者")
    @TableField(fill= FieldFill.INSERT)
    private String createBy;

//    @ApiModelProperty(value = "创建日期")
    @TableField(fill= FieldFill.INSERT)
    private Date createTime;

//    @ApiModelProperty(value = "更新编号")
    private String updateId;

//    @ApiModelProperty(value = "更新者")
    @TableField(fill= FieldFill.UPDATE)
    private String updateBy;

//    @ApiModelProperty(value = "更新时间")
    @TableField(fill= FieldFill.UPDATE)
    private Date updateTime;

//    @ApiModelProperty(value = "删除编号")
    private String deleteId;

//    @ApiModelProperty(value = "删除者")
    private String deleteBy;

//    @ApiModelProperty(value = "删除时间")
    private Date deleteTime;

    private String deleteType;

//    @ApiModelProperty(value = "版本")
    private String editionName;

//    @ApiModelProperty(value = "可预览图片存储ID集")
    private String preImage;

//    @ApiModelProperty(value = "模板图片存储ID")
    private String imageStorage;

//    @ApiModelProperty(value = "模板文件存储ID")
    private String fileStorage;

//    @ApiModelProperty(value = "模块名称")
    private String libraryType;

//    @ApiModelProperty(value = "预览量")
    private String preview;

//    @ApiModelProperty(value = "所需积分数")
    private Integer point;

//    @ApiModelProperty(value = "图片url")
    @TableField(exist = false)
    private String imageUrl;

//    @ApiModelProperty(value = "所属部门")
    private Long deptId;

    public void copyFrom(EnterpriseTemplateTree source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
